package com.yunpeng.dishes.dao.model.entity;

import com.yunpeng.dishes.dao.model.BaseDataDO;
import com.yunpeng.dishes.dao.model.IDataObjectToMap;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * MerchantDishesDO
 *
 * @author : Moore(hemw)
 * @date : 2020-03-27
 */
public class MerchantDishesDO extends BaseDataDO implements IDataObjectToMap {

    /**
     * 菜品名称
     */
    private String name;
    /**
     * 菜品类别
     * 中餐
     * 西餐
     */
    private String category;
    /**
     * 菜色
     * 菜品的细分标识
     * 川菜
     * 鲁菜
     * 湘菜
     * 赣菜
     * 杭帮菜
     * 粤菜
     * 法国菜
     * 意大利菜
     */
    private String type;

    /**
     * 菜品重量
     */
    private BigDecimal weight;

    /**
     * 归属商户id
     */
    private Long merchantId;

    /**
     * 商家菜品id
     */
    private Long merchantDishesId;


    public MerchantDishesDO() {
    }

    public MerchantDishesDO(Long id, Short flag, Long creator, Date createTime, Long updater, Date updateTime, String code, String name, String category, String type, BigDecimal weight, Long merchantId, Long merchantDishesId) {
        super(id, flag, creator, createTime, updater, updateTime, code);
        this.name = name;
        this.category = category;
        this.type = type;
        this.weight = weight;
        this.merchantId = merchantId;
        this.merchantDishesId = merchantDishesId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public BigDecimal getWeight() {
        return weight;
    }

    public void setWeight(BigDecimal weight) {
        this.weight = weight;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getMerchantDishesId() {
        return merchantDishesId;
    }

    public void setMerchantDishesId(Long merchantDishesId) {
        this.merchantDishesId = merchantDishesId;
    }

    @Override
    public String toString() {
        return "MerchantDishesDO{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", category='" + category + '\'' +
                ", type='" + type + '\'' +
                ", weight=" + weight +
                ", merchantId=" + merchantId +
                ", merchantDishesId=" + merchantDishesId +
                ", code='" + code + '\'' +
                ", flag=" + flag +
                ", creator=" + creator +
                ", createTime=" + createTime +
                ", updater=" + updater +
                ", updateTime=" + updateTime +
                "} ";
    }

    @Override
    public Map<String, Object> toMap() {
        Map<String, Object> result = new HashMap<>(16);
        result.put("id", this.id);
        result.put("name", this.name);
        result.put("category", this.category);
        result.put("type", this.type);
        result.put("weight", this.weight);
        result.put("merchant_id", this.merchantId);
        result.put("merchant_dishes_id", this.merchantDishesId);
        result.put("code", this.code);
        result.put("flag", this.flag);
        result.put("creator", this.creator);
        result.put("create_time", this.createTime);
        result.put("updater", this.updater);
        result.put("update_time", this.updateTime);
        return result;
    }
}